<template>
  <div class="son">
    <h3>我是子组件</h3>
    <div>接收到父组件传入的money:{{ money }}</div>
    <el-button @click="btnClick">修改money</el-button>
  </div>
</template>
<script>
export default {
  props: ['money'],
  methods: {
    btnClick () {
      this.$emit('update:money', this.money + 500)
    }
  }
}
</script>
<style lang="scss" scoped>
.son {
  width: 300px;
  height: 200px;
  border: 2px solid red;
}
</style>
